package test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Driver {
    @Autowired
    @Qualifier("busCar")
    private Car car;
    public void work(){
        System.out.println("上班中...");
        car.drive();
    }
}
